<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>登陆</title>
    <script src="/js/jquery-easyui-1.5.4.5/jquery.min.js"></script>
</head>
<body>
用户名：<input size="20" id="userId"><br>
密  码：<input size="20" id="password" type="password">
<input type="button" onclick="login();" value="登陆">

<script type="text/javascript">
function login(){
    var userId = $("#userId").val();
    var password = $("#password").val();
    $.ajax({
        type: "POST",
        dataType:"json",
        url: "/LoginControl/login",
        data: {
            userId:userId,
            password:password
        },
        success: function(msg){
            if(msg){
               if(msg.retCode != "00"){
                   alert(msg.retMsg);
               }else{
                   window.location.href="/LoginControl/index?userId=" + userId;
               }

            }
        }
    });
}
</script>
</body>
</html>